package com.lplb.gateway.config.properties;
/**
 * yml配置文件中 auth节点下的所有数据
 *
 * @author ws
 * @mail 1720696548@qq.com
 * @date 2020/2/12 0012 15:54
 */

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;

import static org.springframework.context.annotation.ScopedProxyMode.DEFAULT;


/**
 * 映射Org属性,yml 配置数据：参考  https://blog.csdn.net/weixin_34220834/article/details/91427948
 *
 * @author ws
 * @mail 1720696548@qq.com
 * @date 2020/2/13 0013 11:02
 * @ConfigurationProperties("auth") 读取 auth 开头的配置数据
 * @Configuration + @EnableConfigurationProperties({ServerProperties.class}) 注册到spring容器
 * @RefreshScope 配置中心可直接修改更新立即生效
 */
@Data
@RefreshScope(proxyMode = DEFAULT)
@Configuration
@ConfigurationProperties("auth")
@EnableConfigurationProperties({AuthProperties.class})
public class AuthProperties {
    /**
     * 是否对响应参数进行过滤
     */
    private boolean xssRespAttack = false;
    /**
     * 不需要token 验证的接口集
     */
    private Map<String, String> interfaceNoCheck = new HashMap<>();

}